<div class="dsn-panel-editor-cube">
	<div class="dsn-panel-editor-title">图片魔方</div>
	<div class="dsn-panel-editor-content">
		<div class="layui-form-item">
			<div class="layui-form-label">与上方距离</div>
			<div class="slider" min="0" max="40" ng-model="Edit.params.margin_y"></div>
			<span class="slider-span"><input ng-model="Edit.params.margin_y"/> px</span>
		</div>
		<div class="layui-form-item">
			<div class="layui-form-label">背景颜色</div>
			<div class="layui-input-inline">
				<input class="layui-input" value="{{Edit.params.bgcolor}}" ng-model="Edit.params.bgcolor"/>
			</div>
			<span class="colorpicker" ng-model="Edit.params.bgcolor"></span>
		</div>

		<div class="layui-form-item">
			<div class="layui-input-inline">
				<div class="">设置图片布局</div>
				<table id="cube-editor" style ="margin-top:10px">
					<tr ng-repeat="(x, row) in Edit.params.layout ">
						<td ng-repeat="(y, col) in row" class="{{col.classname}} rows-{{col.rows}} cols-{{col.cols}}" ng-click="col['isempty'] ? showSelection(Edit, x, y) : changeItem(Edit, x, y)" ng-class="{'empty' : col.isempty, 'not-empty' : !col.isempty}" rowspan="{{col.rows}}" colspan="{{col.cols}}"  x="{{x}}" y="{{y}}">
							<div ng-if="col.isempty">+</div>
							<div ng-if="!col.imgurl && !col.isempty">{{col.cols * 160}} * {{col.rows * 160}}</div>
							<div ng-if="!col.isempty && col.imgurl"><img ng-src="{{col.imgurl}}" style="width:{{col.cols * 85}}px;max-height:{{col.rows * 85}}px;"/></div>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="dsn-panel-editor-relative" ng-show="Edit.params.currentLayout.isempty == false" style="margin-bottom:15px;">
			<div class="dsn-panel-editor-del" title="移除" ng-click="delCube(Edit,Edit.params.currentLayout.classname,Edit.params.currentLayout.cols,Edit.params.currentLayout.rows)">×</div>
			<div class="dsn-panel-editor-line flex">
				<div ng-click="uploadImgChild(Edit.id, Edit.params.currentLayout.classname,'cube')" class="dsn-panel-editor-goodimg flex0" style="min-height: 100px; width: 100px;">
					<img width="100%" ng-show="Edit.params.currentLayout.imgurl" ng-src="{{Edit.params.currentLayout.imgurl}}">
					<div ng-show="!Edit.params.currentLayout.imgurl" class="dsn-panel-editor-goodimg-t1 ng-hide" style="line-height: 100px;"><i class="fa fa-plus-circle"></i> 选择图片</div>
					<div ng-show="Edit.params.currentLayout.imgurl" class="dsn-panel-editor-goodimg-t2" style="width: 100%; height: 20px; line-height: 20px;">重新选择图片</div>
				</div>
				<div class="dsn-panel-editor-line-right flex-y-center">
					<div>
						<div class="layui-form-item" style="margin-bottom:5px">
							<div class="layui-form-label">建议尺寸:</div>
							<div class="layui-form-mid">{{Edit.params.currentLayout.cols * 160}} × {{Edit.params.currentLayout.rows * 160}} 像素</div>
						</div>
						<div class="layui-form-item" style="margin-bottom:5px">
							<div class="layui-form-label">跳转链接: </div>
							<div class="layui-form-mid" style="margin-top:-5px">
								<input class="layui-input" style="width:170px" value="" ng-model="Edit.params.currentLayout.hrefurl"/>
								<span class="layui-btn layui-btn-primary" ng-click="chooseUrl(Edit.id, Edit.params.currentLayout.classname,'cube')">选择链接</span>
								<span style="margin-left:10px">{{Edit.params.currentLayout.hrefname}}</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div id="{{Edit.id}}-modal-cube-layout" style="display:none" role="dialog" aria-hidden="false">
			<div class="layout-table" style="padding-left:70px">
				<ul class="layout-cols layout-rows-{{col.rows}}" style="clear:both" ng-repeat="row in Edit.params.selection">
					<li data-cols="{{col.cols}}" data-rows="{{col.rows}}" ng-click="selectLayout(Edit, Edit.params.currentPos.row, Edit.params.currentPos.col, col.rows, col.cols)" ng-repeat="col in row"></li>
				</ul>
			</div>
		</div>
		<hr>
		<div class="layui-form-item">
			<div class="layui-form-label">左右边距</div>
			<div class="slider" min="0" max="40" ng-model="Edit.params.margin_x"></div>
			<span class="slider-span"><input ng-model="Edit.params.margin_x"/> px</span>
		</div>
		<div class="layui-form-item">
			<div class="layui-form-label">左右内边距</div>
			<div class="slider" min="0" max="40" ng-model="Edit.params.padding_x"></div>
			<span class="slider-span"><input ng-model="Edit.params.padding_x"/> px</span>
		</div>
		<div class="layui-form-item">
			<div class="layui-form-label">上下内边距</div>
			<div class="slider" min="0" max="40" ng-model="Edit.params.padding_y"></div>
			<span class="slider-span"><input ng-model="Edit.params.padding_y"/> px</span>
		</div>
		{if !$type}
		<div class="layui-form-item">
			<div class="layui-form-label">显示平台</div>
			<div class="layui-input-inline" style="width:500px">
				<input class="checkbox" type="checkbox" lay-skin="primary" title="所有平台" name="{{Edit.id}}_platform['all']" ng-model="Edit.params.platform['all']"/>
				{foreach $platform as $pl}
				<input class="checkbox" type="checkbox" lay-skin="primary" title="{:getplatformname($pl)}" name="{{Edit.id}}_platform['{$pl}']" ng-model="Edit.params.platform['{$pl}']"/>
				{/foreach}
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-form-label">显示范围</div>
			<div class="layui-input-inline" style="width:500px">
				<input class="checkbox" type="checkbox" lay-skin="primary" title="所有人" name="{{Edit.id}}_quanxian['all']" ng-model="Edit.params.quanxian['all']"/>
				{foreach $memberlevelList as $lv}
				<input class="checkbox" type="checkbox" lay-skin="primary" title="{$lv.name}" name="{{Edit.id}}_quanxian[{$lv.id}]" ng-model="Edit.params.quanxian[{$lv.id}]"/>
				{/foreach}
			</div>
		</div>
		{include file="designer_page/temp/edit-plugin-mendian" /}

	<div class="layui-form-item" ng-show="!Edit.params.quanxian['all']">
    <div class="layui-form-label">显示用户</div>
    <div class="layui-input-inline">
			<input class="layui-input" ng-model="Edit.params.showmids"/>
    </div>
		<div class="layui-form-mid layui-word-aux">填写用户ID，多个用英文标点逗号(,)分割
	</div>
	{else}
		<input class="checkbox" type="hidden" checked='true' lay-skin="primary" title="所有平台" name="{{Edit.id}}_platform['all']" ng-model="Edit.params.platform['all']"/>
		<input class="checkbox" type="hidden" checked='true' lay-skin="primary" title="所有人" name="{{Edit.id}}_quanxian['all']" ng-model="Edit.params.quanxian['all']"/>
		<input class="checkbox" type="hidden" checked='true' lay-skin="primary" title="所有门店" name="{{Edit.id}}_mendian['all']" ng-model="Edit.params.mendian['all']"/>
	{/if}

</div>